package com.lmm.lcuser.lc_user.config;

/**
 * Created by xmgong on 2017/3/22.
 */

public class AppImgUtils {


    public static String getAppImgUrl(String path) {
        if (path.startsWith("https")) {
            path = path.replace("https", "http");
        }
        return path;
    }

    public static String getQNAppImageUrl(String path, int width, int height) {
        path = getAppImgUrl(path);
        path = getQNAppImageUrl(path, width, height, 75);
        return path;
    }

    public static String getQNAppImageUrl(String path, int width, int height, int query) {
        path = getAppImgUrl(path);
        path += "?imageView2/1/w/" +
                width +
                "/h/" +
                height +
                "/format/png/q/" +
                query +
                "|imageslim";
        return path;
    }

    public static String getQNAppImageLimt(String path) {
        path = getAppImgUrl(path);
        path += "?imageslim";
        return path;
    }


}